home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume14 / mush6.0 / part12 < prev    next >
Encoding:
Internet Message Format  |  1988-04-12  |  39.0 KB

  1. From: island!argv@sun.com (Dan Heller)
  2. Subject: Mail User's Shell, version 6.0
  3.  
  4. #! /bin/sh
  5. # This is a shell archive.  Remove anything before this line, then unpack
  6. # it by saving it into a file and typing "sh file".  To overwrite existing
  7. # files, type "sh file -c".  You can also feed this as standard input via
  8. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  9. # will see the following message at the end:
  10. #        "End of archive 12 (of 14)."
  11. # Contents:  mush.1.b
  12. # Wrapped by rsalz@fig.bbn.com on Wed Apr 13 20:04:55 1988
  13. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  14. if test -f 'mush.1.b' -a "${1}" != "-c" ; then 
  15.   echo shar: Will not clobber existing file \"'mush.1.b'\"
  16. else
  17. echo shar: Extracting \"'mush.1.b'\" \(38123 characters\)
  18. sed "s/^X//" >'mush.1.b' <<'END_OF_FILE'
  19. See the COMMANDS heading below for more detail.
  20. X.PP
  21. This shell-like quality is for the convenience of the user and is not
  22. intended to replace the functionality of
  23. X.IR sh ,
  24. X.IR csh ,
  25. or any other command interpreter.
  26. X.SH "CURSES INTERFACE"
  27. The curses interface utilizes the curses routines intrinsic to most
  28. UNIX systems these days.
  29. This interface is screen oriented rather
  30. than line oriented and allows the user to access commands and messages
  31. more quickly at the cost of history, piping, and a few commands.
  32. X.PP
  33. Many users who prefer the curses interface might want to always start
  34. all their mail sessions in the curses interface.
  35. Putting the curses
  36. command in your initialization file is a no-no, so you can alias your
  37. login shell mail command to include the -C option.
  38. If you use the Bourne Shell, you're going to have to type it out all the time.
  39. Mush will to attempt to know not to run a shell if you're just sending mail to
  40. someone, so the
  41. X.I csh
  42. command line sequences:
  43. X.sp
  44. X.ti +2
  45. X% alias mail 'mush -C'
  46. X.ti +2
  47. X% mail fred
  48. X.sp
  49. will mail to fred and not enter the shell.
  50. However, if you just said, "mail"
  51. with no arguments, you'll enter the shell in curses mode if you have mail.
  52. If you don't, you'll be told so, and the shell will not start.
  53. If you want to enter curses mode even if
  54. you don't have mail, use the \-S option on the command line.
  55. X.PP
  56. In curses mode, the user's terminal has it's \*Qecho\*U turned off so commands
  57. that are issued are not echoed on the screen.
  58. Certain commands cause the mode
  59. to return to normal for typing purposes (sending mail, for example).
  60. In normal operation, the screen will display the current set of message
  61. headers, the current message number is in the top left corner, the
  62. mail status on the top line, and the cursor will be placed on the current
  63. message.
  64. The number of message headers displayed is set by the variable
  65. X.BR screen .
  66. If the user does not have that variable set, the baud rate is checked and
  67. the size of the screen is set according to optimal refresh time.
  68. Usually, 300 baud gives 7 lines, 1200 gives 14, 2400 gives 22 lines, and all
  69. higher baud rates give the size of the screen, whatever that may be.
  70. Note that the top line is reserved for \*Qstatus\*U and the bottom line is
  71. for user interaction should it be required.
  72. X.PP
  73. The user may now type commands via key sequences which are not echoed
  74. to the screen.
  75. Thus, function keys may be bound to \*Qcommands\*U by using the 
  76. X.B bind
  77. command.
  78. A list of key-to-command bindings can be found at runtime by typing `?'
  79. in curses mode or by using the
  80. X.B bind
  81. command in line mode.
  82. X.PP
  83. The commands to which you can map sequences are intended to be as self
  84. explanatory as possible, but admittedly, it's easier to figure out via
  85. trial and error than to try to wade through this documentation.
  86. A list of the legal curses commands can be obtained when executing the
  87. bind command.
  88. Regular tty line-mode commands are not issued from
  89. the curses interface; only special curses mode commands are understood.
  90. The current list of valid curses commands is:
  91. X.sp
  92. X.ta 1.5i 3i 4.5i
  93. X.in +4
  94. X.nf
  95. alias    back msg    bind    bottom page
  96. chdir    copy    copy list    delete
  97. delete list    display    display next    exit
  98. exit!    first msg    folder    goto msg
  99. ignore    last msg    line mode    lpr
  100. mail    mail flags    my hdrs    next msg
  101. preserve    quit    quit!    redraw
  102. reply    reply all    reverse video    save
  103. save list    saveopts    screen back    screen next
  104. search cont    search down    search up    shell escape
  105. show hdr    sort    sort reverse    source
  106. top    top page    unbind    undelete
  107. undelete list    update    variable    version
  108. write    write list    help
  109. X.fi
  110. X.in -4
  111. X.sp
  112. X.PP
  113. The following is a list of default key-command bindings.
  114. If you specify bind commands in your initialization file that conflict with
  115. these defaults, your settings will override the defaults.
  116. The default settings given here
  117. use the ^-character method to indicate control characters.
  118. Thus, `^X' would mean control-X even
  119. though you'd have to type \*Q\\CX\*U to set
  120. the binding and actually use the control key and the `X' key simultaneously
  121. to really
  122. X.I do
  123. a Control-X.
  124. This is mostly because nroff makes printing the backslash
  125. character so amazingly difficult.
  126. X.TP
  127. X\&., t, p, T=top, n=next
  128. Display (type/print) message.
  129. Top will display the first
  130. X.B crt
  131. lines of a message.
  132. Next will print the next message.
  133. If the current message is deleted, the next undeleted message is found.
  134. You might notice this is different than the line mode, which will return
  135. an error message that the current message is marked as deleted.
  136. X.TP
  137. X+, j, J, RETURN
  138. Go to next message.
  139. X.TP
  140. X-, k, K, ^K
  141. Go to previous message.
  142. X.TP
  143. X^, $
  144. Go to first/last message.
  145. X.TP
  146. X{, }
  147. Go to top/bottom of screen.
  148. X.TP
  149. a
  150. Set aliases.
  151. X.TP
  152. b, B
  153. Set/unset bindings.
  154. X.TP
  155. d, D, u, U
  156. Delete/undelete messages (capitals prompt for message list).
  157. X.TP
  158. f
  159. Change folder.
  160. If current folder has changed, verification for update will be requested.
  161. X.TP
  162. g, 0-9
  163. Go directly to a specified message.
  164. When the \*Qgoto\*U command
  165. is selected, a prompt at the bottom of the window prompts for a
  166. X.BR "message list" .
  167. Anything which describes a message list may be used.
  168. Since
  169. X.I Mush
  170. commands return message lists, a legal
  171. X.I Mush
  172. command enclosed in backquotes may be used to go to a particular message.
  173. The new current message pointer will point to the next
  174. message, returned by the command, that is below the old current message.
  175. An example:
  176. X.sp
  177. X.ti +2
  178. goto msg: `pick -f argv`
  179. X.sp
  180. This will cause the current message to move to the first message
  181. in the current folder from the user \*Qargv\*U that comes after the
  182. message pointed to when the \*Qgoto\*U was issued.
  183. So, if messages 1 and 5
  184. are from the user \*Qargv\*U and the current message the user was on
  185. was message 3, then the new current message would be message 5, since it
  186. is the first message found after message 3 that is from \*Qargv\*U.
  187. X.TP
  188. h
  189. Set personal headers.
  190. X.TP
  191. H
  192. Print header information for the current message.
  193. This only works when the user is provided with the \*Q...continue...\*U
  194. prompt and he wishes to view the current message header instead of
  195. redrawing the entire screen.
  196. X.TP
  197. i
  198. Set ignored headers.
  199. X.TP
  200. m, M
  201. Send mail (capital prompts for mail flags).
  202. X.TP
  203. o, O
  204. Order messages (sort; capital reverses order).
  205. A prompt requests the sort constraints.
  206. X.TP
  207. q, Q, x, X
  208. Quit/exit.
  209. X\&`q' will test to see if the current folder has been updated and prompt
  210. the user to verify updating.
  211. X\&`x' does not update mail, but quits the program.
  212. X\&`Q' does not prompt for update verification; if changes were
  213. made, updating is automatic.
  214. X\&`Q' (quit!) and `X' (exit!) will work even when typed at the
  215. X\*Q...continue...\*U prompt, whereas `q' and `x' will not.
  216. X.TP
  217. r, R
  218. Reply/reply all.
  219. X.TP
  220. s, S, c, C, w, W
  221. Save, copy, or write messages (capitals prompt for message lists).
  222. X.TP
  223. v
  224. Set regular variables (as opposed to environment variables).
  225. X.TP
  226. V
  227. Print version number.
  228. X.TP
  229. z, Z
  230. Print next/previous screenful of message headers.
  231. X.TP
  232. X^L
  233. Redraw the screen.
  234. X.TP
  235. X^P
  236. Preserve current message (toggle).
  237. X.TP
  238. X^U
  239. Update folder.
  240. A prompt will request confirmation.
  241. X.TP
  242. X^R
  243. Toggle reverse video mode (current message is in reverse video).
  244. X.TP
  245. X|
  246. Send message to printer
  247. X.TP
  248. X!
  249. Shell Escape.
  250. Prompts for command; RETURN invokes a shell.
  251. X.TP
  252. X%
  253. change directory.
  254. X.TP
  255. X(, )
  256. Source/saveopts.
  257. Prompts for file name.
  258. X.TP
  259. X/, ^/, ^N
  260. Forward, backward, continue search for patterns.
  261. Entire messages are not searched for here.
  262. Only the text available on the screen is searched for.
  263. Note that some terminals use `^_' (control-underscore) for `^/',
  264. so you may wish to re-bind this key.
  265. X.TP
  266. X:[cmd]
  267. Enter line mode for one command.
  268. If no command is given, curses mode
  269. is exited and the session continues in line mode.
  270. X.PP
  271. When setting new key sequences to be bound to commands, the user may
  272. use control keys and the ESCAPE character for extended commands.
  273. Exceptions are control-C, control-\\, and possibly other control characters
  274. depending on your system's configuration or your current tty interrupt
  275. character settings.
  276. The spacebar may not be bound using the interface
  277. supplied by the curses mode `b'
  278. X.RB ( bind )
  279. command since spaces are stripped before processing.
  280. To bind the spacebar to a function, use the line mode command
  281. X.sp
  282. X.ti +2
  283. bind " " display next
  284. X.sp
  285. This example shows how you can bind the spacebar to display the next message.
  286. This command may be given in the initialization file or on a
  287. X.I Mush
  288. command line.
  289. X.PP
  290. When assigning key sequences to commands, the user enters the
  291. X.B bind
  292. command and prompting is done.
  293. If the
  294. user wishes to have control characters or the escape character in a key
  295. sequence while still using ascii format, the special notation for control
  296. characters is provided.
  297. This sequence is used primarily for the use of
  298. binding control character sequences in the initialization file.
  299. This format
  300. is also used to display the current key-command mappings by the program.
  301. X.PP
  302. To specify control characters in ascii format for the bind command, the
  303. sequence \*Q\\Cc\*U is used where `c' is the
  304. character which the control key will translate to and must be in upper case.
  305. The sequence \*Q\\CP\*U would map to control-P.
  306. If the user wishes to indicate the RETURN key, this is specified
  307. with the string \*Q\\n\*U and
  308. the tab key is specified by the string \*Q\\t\*U.
  309. As a more complex example, on a Wyse-50 terminal, the 8th function key
  310. outputs the three characters: control-A, H, line-feed.
  311. To map this function key to a command, the
  312. user would have to enter the sequence \*Q\\CAH\\n\*U as the key sequence,
  313. then follow up with a valid curses command.
  314. From then on, if the user presses that function key,
  315. then the command mapped to it will be executed.
  316. X.PP
  317. The ESCAPE key is signified by the sequence, \*Q\\E\*U.
  318. On a Sun-3 workstation,
  319. the R1 key outputs the character sequence: ESC, [, 2, 0, 8, z.
  320. The corresponding
  321. X.B bind
  322. key sequence would be \*Q\\E[208z\*U.
  323. Restrictions are that key sequences may not contain the space character
  324. unless bound in line mode, and can never begin with a digit.
  325. X.PP
  326. Whenever a command is entered, other than `^L'
  327. X.RB ( redraw ),
  328. that causes the screen to scroll or be refreshed in any way,
  329. X.I Mush
  330. is left in the
  331. X.I continue
  332. mode.
  333. When in this mode, the user is given his line-mode prompt followed
  334. by \*Q...continue...\*U indicating that he may issue a new command or
  335. return to the top level where the current message headers are displayed
  336. on the screen.
  337. Remember that this is still the curses mode, but much time
  338. is saved by avoiding redrawing the screen after each command.
  339. The user may move up and down messages using the appropriate commands
  340. X(j/k by default) or anything else the curses mode allows.
  341. Only the spacebar and the exit and quit commands will return
  342. to the top level.
  343. Because the exit and quit commands are used to do this, there are 2 additional
  344. ways to \*Qquit\*U from curses mode and return to the login shell.
  345. The \*Qexit\*U and \*Qquit\*U commands will quit from the top level, but
  346. the commands
  347. X.B exit!
  348. and 
  349. X.B quit!
  350. are used to exit from the \*Qcontinue\*U level in the curses interface as well
  351. as from the top level.
  352. X.PP
  353. Note that the best way to understand the curses interface is to just use it.
  354. In line mode, the command \*Qcurses\*U puts you into curses mode.
  355. X.SH "GRAPHICS INTERFACE"
  356. When running the window-based graphics interface, there will be 5
  357. windows displaying panels of commands, message headers and a text
  358. window which is used for displaying messages or writing messages
  359. to send to other users.
  360. X.PP
  361. The panel items have labels describing their functionality.
  362. Selecting
  363. a panel item with the LEFT mouse button causes the action to be executed.
  364. The RIGHT mouse button displays a menu of options that the command may
  365. branch to.
  366. For example, the
  367. X.B save
  368. panel item by default will save messages to the file "mbox", but if the
  369. RIGHT mouse button causes a menu to be displayed the choices of where
  370. to save the message increases to include the items in the menu.
  371. These typically include the files in the user's folder directory (see the
  372. X.B folder
  373. variable below).
  374. X.PP
  375. At the end of each list of menu entries for panel items is an item
  376. labelled \*Qhelp\*U.
  377. When this item is chosen, help with that command
  378. is displayed in the center of the console.
  379. X.PP
  380. When composing letters, the interface is the same for the tool mode,
  381. the line mode and the curses mode.
  382. Tilde escapes are recognized by all
  383. the interfaces, but the tool interface allows the user to use the menu
  384. mouse button to select the tilde escape desired.
  385. X.PP
  386. If the user wishes to review a mail message while in edit-mode, he may
  387. do as the other interfaces and enter the tilde escape command \*Q~:print\*U.
  388. This will cause the current message (or the numbered message, if given) to
  389. be displayed in the window.
  390. Editing is temporarily put on hold till the user
  391. enters a `q' in the message window to indicate that he is done reading the
  392. message and input is to be directed again to the letter being composed.
  393. X.SH COMMANDS
  394. Described below are legal commands understood by
  395. X.I Mush
  396. that you can type at the line mode prompt.
  397. Most commands have abbreviations
  398. X(given in parentheses) and can be followed by message lists.
  399. In most cases,
  400. whitespace is not necessary to separate commands from message lists.
  401. For example, \*Qd*\*U will delete all messages, and \*Qu1-7 {4}\*U will
  402. undelete messages 1 through 7 except for message number 4.
  403. X.PP
  404. The ability to customize commands using the
  405. X.B cmd
  406. facility allows users to customize
  407. X.I Mush
  408. to resemble other mailers.
  409. However, efforts have already been made to include commands which are backwards
  410. compatible with other line-mode mailers.
  411. Users of the graphics tool mode of
  412. X.I Mush
  413. may have little need for the command line mode because the icon based
  414. interface allows interaction with many commands.
  415. The graphics mode is much more restrictive in favor of user
  416. friendliness but most useful commands may be achieved anyway.
  417. X.PP
  418. The following is a list of all recognized commands.
  419. X.TP
  420. X.B alternates
  421. X.RB ( alts )
  422. This command
  423. is useful if you have accounts on several machines.
  424. It can be used to inform
  425. X.I Mush
  426. that the listed addresses are really you.
  427. When you
  428. X.B reply
  429. to messages,
  430. X.I Mush
  431. will not send a copy of the message to any of the addresses
  432. listed on the
  433. X.B alternates
  434. list.
  435. If the
  436. X.B alternates
  437. command is given with no argument, the current set of alternate
  438. names is displayed.
  439. X.TP
  440. X.B cd
  441. Change the working directory to that specified, if given.
  442. If no directory is given, then changes to the user's home directory.
  443. X.TP
  444. X.BR cmd / uncmd
  445. Command line aliases are set and unset using these commands.
  446. More extensive information is given in the LINE-MODE INTERFACE section.
  447. X.B Uncmd
  448. may take `*' as an argument to uncmd everything set.
  449. X.TP
  450. X.BR debug " [N]"
  451. Set debugging level to N (1 by default).
  452. When in debug mode, the user can see some of the flow of
  453. control the program makes while executing.
  454. The intent of the debug level is for tracking down
  455. bugs with the program at specific locations.
  456. Periodically, the program may segmentation fault and core dump.
  457. When this happens, the user can reenter the program,
  458. set the debugging level and recreate the problem.
  459. X.sp
  460. If the user suspects memory allocation problems, a debugging
  461. level of 2 or higher will prevent memory from being freed causing no
  462. overwriting of memory bounds.
  463. X.sp
  464. If the user suspects sendmail errors,
  465. a debugging level of 3 or higher will prevent sendmail from starting
  466. and outgoing mail is sent to the standard output instead of actually
  467. being sent.
  468. X.TP
  469. X.BR delete / undelete
  470. X.RB ( d / u )
  471. Takes a message list as argument and marks them all as deleted.
  472. Deleted messages will not be saved in
  473. X.IR mbox ,
  474. nor will they be available for most other commands.
  475. If the folder has not been updated, deleted messages can be recovered
  476. with
  477. X.BR undelete .
  478. X.TP
  479. X.B dt
  480. Deletes the current message and prints the next message.
  481. X.TP
  482. X.B echo
  483. Echoes all the arguments given on the command line, expanding variables
  484. and history references.
  485. X.TP
  486. X.B exit
  487. X.RB ( x )
  488. Effects an immediate return to the login shell without
  489. modifying the current folder or system spool directory.
  490. X.TP
  491. X.B expand
  492. Aliases, given as arguments, are expanded as they would be if you
  493. were to send mail to each.
  494. X.TP
  495. X.BR fkey / unfkey
  496. Prints the values of the function keys.
  497. The function keys are used in
  498. the graphics tool mode only.
  499. You can set the values of function keys explicitly using the
  500. X.B fkey
  501. command, but the whole process is automated by using the function key
  502. interface provided by the graphics mode.
  503. By default, the last key in each function key pad displays
  504. the values of all the function keys in that set of function keys.
  505. There are the left, right and top set of keys.
  506. X.TP
  507. X.BR folder " [\-N] [\-r] [!] [ %[user] | # | & | file ]"
  508. X.RB ( fo )
  509. Change current folder.
  510. With no arguments, prints the name of the current folder.
  511. The arguments are:
  512. X.nf
  513. X.ta 1i
  514. X.in +2
  515. X\-N    No headers are displayed upon entering new folder
  516. X\-r    Set Read-Only mode (can't alter new folder)
  517. X!    If specified, the current folder is not updated
  518. X%[user]    Change to /usr/spool/mail/[user] (default is yours)
  519. X#    Switch back to the previous folder
  520. X&    Change folder to $mbox (default is ~/mbox)
  521. X.in -2
  522. X.fi
  523. X.TP
  524. X.B folders
  525. List the names of the folders in your folder directory.
  526. Your folder directory is the directory
  527. X.I Mail
  528. in your home directory.
  529. Or, you can set the variable
  530. X.B folder
  531. to specify another folder directory.
  532. X.br
  533. X.TP
  534. X.BR from " [ + | \- ]"
  535. X.RB ( f )
  536. With no arguments, from will print the current message's header.
  537. If given a message list, from will print the headers of those
  538. messages which are in the list.
  539. X.sp
  540. The special arguments `\-' and `+' can be given to move the
  541. current message pointer to the previous or next message
  542. respectively while also printing that message's header.
  543. If a message list was given in addition to `\-' or `+', then
  544. the current message pointer will be set to the first or last
  545. message, respectively, in the message list given.
  546. Examples:
  547. X.sp
  548. X.ti +2
  549. pick \-f Dan | from +
  550. X.sp
  551. will print the headers of all messages that contain Dan in
  552. in the author's name and set the current message pointer to
  553. the last one of that kind in the list.
  554. X.sp
  555. X.ti +2
  556. from \- 10-30 {16}
  557. X.sp
  558. will print the headers of messages 10 through 30 except for
  559. message 16 and set the current message pointer to 10.
  560. X.sp
  561. X.ti +2
  562. from +
  563. X.sp
  564. will print the header of the message after the current message
  565. and increment the current message pointer to the next message.
  566. X.sp
  567. X.ti +2
  568. from $
  569. X.sp
  570. will print the last message's header and not move the current
  571. message pointer.
  572. X.TP
  573. X.BR headers " [ \-H[:c] ] [ + | \- ]"
  574. X.RB ( h ,
  575. X.BR z )
  576. Prints a screenful of message headers listed in the
  577. current folder.
  578. If a message number is given on the command line,
  579. the first message of the screenful of messages will be
  580. that message number.
  581. The `z' command is identical to the \*Qh +\*U
  582. command and remains for compatibility reasons.
  583. The variable
  584. X.B screen
  585. may be set to tell how many headers are in a screenful.
  586. In the graphics tool mode, the variable
  587. X.B screen_win
  588. contains the number of headers used in the headers subwindow.
  589. X.sp
  590. A typical header may look like:
  591. X.sp
  592. X.ti +2
  593. X5 >N  argv@spam.istc.sri.com Feb 19, (10/278) Test
  594. X.sp
  595. This line indicates that it is message number 5 and the
  596. X.I >
  597. indicates that the \*Qcurrent message pointer\*U is pointing to this
  598. message.
  599. The next two positions indicate the message status.
  600. The first
  601. may be one of, \*QN\*U (new and unread), \*QU\*U (old, but still
  602. unread), \*Q*\*U (deleted), \*QO\*U (old and read), \*QP\*U (preserved),
  603. or \*Q \*U (read).
  604. The second position may have an \*Qr\*U if the message
  605. has been replied to.
  606. X.sp
  607. The author of the example message header is
  608. X.IR argv@spam.istc.sri.com ,
  609. the date is
  610. X.IR "Feb 19" ,
  611. the number of lines in the message is
  612. X.IR 10 ,
  613. the number of characters is
  614. X.I 278
  615. and the subject of the message is
  616. X.IR Test .
  617. The format of the message header exemplified here is described by
  618. the string variable
  619. X.BR hdr_format .
  620. The example given above has a hdr_format of
  621. X.sp
  622. X.ti +2
  623. set hdr_format = "%25f %7d (%l/%c) %25s"
  624. X.sp
  625. See the description of
  626. X.B hdr_format
  627. in the VARIABLES section for more information on header formats.
  628. X.sp
  629. You can print a special subset of message headers by using the
  630. X.I \-H:c
  631. option, where `c' is one of:
  632. X.nf
  633. X.in +2
  634. X.ta 1i
  635. n    new messages
  636. d    deleted messages
  637. u    unread messages
  638. o    old messages
  639. r    replied to messages
  640. a    all messages
  641. X.fi
  642. X.in -2
  643. X.sp
  644. More options to the
  645. X.B headers
  646. command include
  647. X.RI ` + '
  648. and
  649. X.RI ` \- '.
  650. Each will print the next or previous screenful of message headers.
  651. The
  652. X.B z
  653. command can also be used; `z' alone will print the next
  654. screenful (thus, the `+' is optional),
  655. and \*Qz \-\*U is equivalent to \*Qh \-\*U.
  656. X.sp
  657. Headers affects all the messages it displays, so piping may be done
  658. from the headers command.
  659. Piping to the headers command causes the
  660. message headers affected by the previous command to be printed.
  661. This action is identical to piping to the
  662. X.B from
  663. command.
  664. X.TP
  665. X.B help
  666. Help is provided on a per topic basis and on a general basis.
  667. For general help, just typing
  668. X.I help
  669. will provide some general information as to how to get further help
  670. and a list of topics suggested for more specific help.
  671. There is also help provided for each command by using the \-?
  672. option to most commands.
  673. This option will provide command line usage information as well as a
  674. description of what the command does and how to use it.
  675. X.TP
  676. X.BR history " [\-h] [\-r] [N]"
  677. This command displays the command history in chronological order; early
  678. commands are printed first followed by more recent commands displayed last.
  679. Option
  680. X.I \-h
  681. suppresses printing of history event numbers with each history command.
  682. Option
  683. X.I \-r
  684. reverses the order of the history events displayed.
  685. X.sp
  686. If a number
  687. X.I N
  688. is given, then that number of previous commands is
  689. echoed rather than the number set by the variable
  690. X.BR history .
  691. X.TP
  692. X.BR ignore / unignore
  693. Display or set a list of headers to be ignored when displaying messages.
  694. When reading messages, all the message headers are displayed with the text
  695. body of the message.
  696. Since these message identifier fields are cumbersome and uninteresting
  697. in many cases, you can filter out unwanted headers by using this command.
  698. For example,
  699. X.sp
  700. X.ti +2
  701. ignore Received Date Message-Id
  702. X.sp
  703. will ignore the three specified fields.
  704. The command
  705. X.B unignore
  706. is used to reverse the effects of
  707. X.BR ignore .
  708. X.TP
  709. X.BR lpr " [\-Pname] [msg_list]"
  710. takes a message list and sends those messages, one by one, to the printer,
  711. each separated by page feeds.
  712. A default printer name is supplied if one is not specified on the
  713. command line (-Pprinter-name).
  714. If you have the variable
  715. X.B printer
  716. set, that printer name will be used.
  717. X.sp
  718. If the variable
  719. X.B print_cmd
  720. is set, the command described by that variable will be used instead
  721. of the default system command.
  722. In such cases, the -P option and the
  723. X.B printer
  724. variable are ignored and the command is simply executed as is.
  725. This is useful for piping messages through to UNIX
  726. commands (commands not a part of
  727. X.IR Mush .
  728. X.TP
  729. X.B ls
  730. This command duplicates the
  731. X.I UNIX
  732. command
  733. X.I /bin/ls.
  734. The variable
  735. X.B lister
  736. describes flags to be passed to ls automatically.
  737. By default,
  738. X.I ls
  739. always uses the -C flag (column output).
  740. X.TP
  741. X.BR mail " [flags] [recipient ...]"
  742. X.RB ( m )
  743. Send mail to a list of users.
  744. If no recipient list is specified on the
  745. X.I Mush
  746. command line, then a \*QTo: \*U prompt will request one.
  747. A list of recipients must be supplied.
  748. This implementation of
  749. X.I Mush
  750. supports mailing to files and programs as recipients, but at least one
  751. legitimate user must be specified.
  752. Filenames must be full pathnames, thus, they must start with a `/' or there
  753. is no way to know whether a recipient is a pathname or a real user.
  754. The special characters `+' and `~' may precede pathnames since they are
  755. expanded first to the user's folder directory (+), as described by the variable
  756. X.BR folder ,
  757. and the user's home directory (~).
  758. Mailing to programs is indicated by the pipe `|' character preceding the
  759. program name.
  760. Since the user's path is searched, full pathnames are not required for
  761. programs which lie in the user's PATH environment variable.
  762. Example:
  763. X.sp
  764. X.ti +2
  765. mail username, /path/to/filename, "|program_name", +folder_name, ~user/mbox
  766. X.sp
  767. Options are:
  768. X.nf
  769. X.in +2
  770. X.if n .ta 1.5i
  771. X.if t .ta 1.8i
  772. X\-e    immediately enter editor (autoedit)
  773. X\-F    add random fortune to the end of message
  774. X\-s [subject]    prompt for subject [set subject explicitly]
  775. X\-f [msg_list]    forward msg_list (not indented)
  776. X\-h [msg_list]    include msg_list with headers
  777. X\-i [msg_list]    include msg_list into letter
  778. X\-v    verbose (passed to mail delivery program)
  779. X.in -2
  780. X.fi
  781. X.sp
  782. The verbose option may not be available depending on the mail transport
  783. agent on your system.
  784. X.sp
  785. The \-e flag causes you to enter the editor described by the variable
  786. X.BR visual .
  787. X.sp
  788. The \-i flag will include the current message into the body of the
  789. message you are about to send.
  790. The included message is indented by
  791. the string \*Q> \*U or by the string described by the variables
  792. X.BR indent_str ,
  793. X.BR pre_indent-str ,
  794. and
  795. X.BR post_indent_str .
  796. See the VARIABLES section for more information on these string values.
  797. If a message list is given after the \-i option, then the message
  798. described by that list are included.
  799. The \-h option is identical to the \-i option except that the headers of
  800. the message are also included.
  801. X.sp
  802. The \-s flag looks at the next argument and sets the subject to that
  803. string.
  804. If the string is to contain spaces, enclose the entire subject
  805. in quotes.
  806. If there is no following argument, then the subject will
  807. be prompted for.
  808. This flag is useful if the user:
  809. X.sp
  810. X.in +2
  811. X.nf
  812. X\(bu    does not have the variable \fBask\fR set, or
  813. X\(bu    wishes to change the subject used with \fBreply\fR
  814. X.in -2
  815. X.fi
  816. X.sp
  817. The subject is not prompted for and is ignored completely if the \-f flag
  818. is specified (see below).
  819. X.sp
  820. The \-f flag is for message forwarding only.
  821. An optional message list can be given just as the -i option has.
  822. The forward option does not allow you to edit the message(s) being forwarded
  823. unless the -e flag is also specified.
  824. The subject of the message (if available) is the same as the \fIcurrent\f
  825. message; it not necessarily the message of the message being forwarded.
  826. The subject of forwarded mail cannot be changed.
  827. However, using the \-e flag
  828. will allow the user to change the subject once in editing mode using the
  829. escape sequence, \*Q~s\*U.
  830. X.sp
  831. Forwarded mail that has not been edited by the user will contains special
  832. headers such as
  833. X.sp
  834. X.ti +2
  835. Resent-To:
  836. X.ti +2
  837. Resent-From:
  838. X.sp
  839. and perhaps other depending on your mail transport agent.
  840. Sendmail, for example, will add a number of other \*QResent-*\*U headers.
  841. X.TP
  842. X.BR my_hdr / un_hdr
  843. You can create personalized headers in your outgoing mail using this command.
  844. X.sp
  845. X.nf
  846. Usages:
  847. X.in +2
  848. X.ta 2.5i
  849. my_hdr    print all your headers
  850. my_hdr header    print value of header
  851. my_hdr header: string    set header to string
  852. un_hdr header:    unset header
  853. X.in -2
  854. X.sp
  855. X.fi
  856. To set a header, the first argument must be a string
  857. that contains no whitespace (spaces or tabs) and must end with
  858. a colon (:).
  859. The rest of the command line is taken to be the
  860. text associated with the mail header specified.
  861. If any quotes are used in the header and the header itself is not set in
  862. quotes, then quotes should be escaped (preceded) by a backslash.
  863. This holds true for semicolons, pipe characters
  864. or any other metacharacter that
  865. X.I Mush
  866. might interpret as a command line modifier.
  867. X.sp
  868. If the variable
  869. X.B no_hdrs
  870. is set, then your headers will not be added to outgoing messages,
  871. but no headers will be unset.
  872. The
  873. X.B un_hdr
  874. command may take `*' as an argument to un_hdr everything set.
  875. X.TP
  876. X.BR pick " [flags] [<pattern>]"
  877. Allows the user to select particular messages from a folder.
  878. The <pattern> is a \*Qregular expression\*U as described by
  879. X.IR ed .
  880. If no arguments are given, the previous expression searched for is used.
  881. You can search for messages from a user, for a particular subject line,
  882. between certain dates, and limit searches to a range of messages.
  883. You can also find all messages that do not
  884. match the same arguments mentioned above.
  885. X.sp
  886. X.nf
  887. Options:
  888. X.ta 1.5i
  889. X.in +2
  890. X\-d [\-]date    messages sent on or after [`\-' before] date
  891. X\-f    search for pattern in \*QFrom\*U field only
  892. X\-h header    search for pattern in specified header only
  893. X\-i    ignore case of letters when searching
  894. X\-r msg_list    search only the listed messages
  895. X\-s    search for pattern in \*QSubject\*U field only
  896. X\-t    search for pattern in \*QTo\*U field only
  897. X\-x    select messages not containing the pattern
  898. X.in -2
  899. X.fi
  900. X.sp
  901. Only one of \-d, \-f, \-h, \-s and \-t can be specified at once.
  902. Entire messages are scanned for the <pattern>
  903. unless \-f, \-h, \-s or \-t is specified.
  904. Messages marked for deletion are also searched.
  905. No patterns can be specified with the \-d option,
  906. and the \-x option may not be used with \-d.
  907. X.sp
  908. For the \-d option, \*Qdate\*U is of the form:
  909. X.sp
  910. X.ti +2
  911. month/day/year
  912. X.sp
  913. with an optional `\-' to specify that the messages of interest are those
  914. older than that date.
  915. Omitted fields of the date default to today's values.
  916. Examples of selecting on date:
  917. X.nf
  918. X.in +2
  919. X.ta 2.0i
  920. X.sp
  921. pick \-d 4/20    on or after April 20, this year
  922. pick \-d \-/2/85    on or before the 2nd, this month, 1985
  923. pick \-d /    today only
  924. X.fi
  925. X.in -2
  926. X.sp
  927. At least one `/' char must be used in a date.
  928. There is no strong date checking; 2/30 would be considered a valid date.
  929. X.sp
  930. Other examples of
  931. X.B pick:
  932. X.sp
  933. X.ti +2
  934. pick \-d 2/5/86 | pick \-d \-2/5/87 | pick \-s "mail stuff" | lpr
  935. X.sp
  936. will find all the messages between the dates February 5, 1986 and
  937. February 5, 1987 that contain the subject "mail stuff" and print them.
  938. X.sp
  939. X.ti +2
  940. pick -s Re: | delete
  941. X.sp
  942. deletes messages that have \*QRe:\*U in the subject
  943. X.sp
  944. X.ti +2
  945. folder +project | pick -f frank
  946. X.sp
  947. Finds all messages from frank in the folder described by +project.
  948. X.sp
  949. X.ti +2
  950. pick -h return-path ucbvax
  951. X.sp
  952. Searches all messages that have the header "Return-Path:" and determines
  953. if the string \*Qucbvax\*U is in the header.
  954. Note that case sensitivity
  955. applies only to the pattern searched, not the header itself.
  956. X.TP
  957. X.B preserve
  958. X.RB ( pre )
  959. Saves a message list in your spool directory rather than
  960. your mailbox unless it has been explicitly deleted.
  961. The variable
  962. X.B hold
  963. causes all messages to be held in your spool directory automatically.
  964. X.TP
  965. X.B print
  966. X.RB ( p ,
  967. X.BR type ,
  968. X.BR t )
  969. Takes a message list and displays each message on the user's terminal.
  970. If the first letter of the command is a capital letter (`P' or `T'),
  971. then \*Qignored\*U headers are not ignored
  972. X.I provided
  973. that the variable,
  974. X.B alwaysignore
  975. is not set.
  976. If the variable is set, the ignored headers will be
  977. ignored regardless of the command used to display the message.
  978. See the
  979. X.B ignore
  980. command for more information about ignored message headers.
  981. X.sp
  982. The `+' and the `-' keys can be used to display the \*Qnext\*U
  983. and \*Qprevious\*U messages respectively.
  984. The `+' key has the caveat that the
  985. message is not paged at all and none of the messages headers are displayed.
  986. X.TP
  987. X.B pwd
  988. Prints the current working directory.
  989. X.TP
  990. X.B quit
  991. X.RB ( q )
  992. Updates the current folder and exits from
  993. X.IR Mush .
  994. If the variable \*Qhold\*U is set, all messages not marked for deletion are
  995. saved in the spool directory.
  996. Otherwise, messages which have been read are saved to
  997. X.I ~/mbox
  998. or to the file described by the string variable
  999. X.BR mbox .
  1000. Messages marked for deletion are discarded.
  1001. Unread messages go back to the spool directory in all cases.
  1002. X.TP
  1003. X.BR reply / replyall " [flags]"
  1004. X.RB ( r / R )
  1005. Messages are replied to by sending mail to the sender of each message
  1006. in the given message list.
  1007. The commands
  1008. X.B replysender
  1009. and
  1010. X.B respond
  1011. are equivalent to
  1012. X.BR reply .
  1013. X.B Replyall
  1014. responds to all the recipients as well as the sender of the message.
  1015. These commands understand all the same flags as the
  1016. X.B mail
  1017. command.
  1018. X.sp
  1019. When constructing a return mail address to the author of a message,
  1020. X.B reply
  1021. searches for special mail headers in the author's message which
  1022. indicate the most efficient mail path for return mail.
  1023. X.I Mush
  1024. will search for the \*QFrom:\*U, \*QReply-To:\*U,
  1025. and \*QReturn-Path:\*U headers by default.
  1026. X.sp
  1027. If none of these fields are found in the message, the first line of the
  1028. message is parsed;
  1029. this \*QFrom \*U line is different from the \*QFrom: \*U line.
  1030. If the user wishes to change the order or the actual fields to search for
  1031. return paths, then the variable
  1032. X.B reply_to_hdr
  1033. may be set to a list of headers to be used (in the order specified).
  1034. If it is set, but has no value, the first \*QFrom \*U line is used
  1035. regardless of what headers the author's message contains.
  1036. This is a special case setting for the variable \*-
  1037. the \*QFrom \*U line may not be specified explicitly as an item in the
  1038. list of reply-to headers.
  1039. X.sp
  1040. When replying to all recipients of the message using the
  1041. X.B replyall
  1042. X.RB ( R )
  1043. command, only the original author's address can be obtained from
  1044. the message headers.
  1045. There is no way determine the best path to the
  1046. other recipients of the message from message headers aside from taking
  1047. their addresses directly from the \*QTo:\*U and \*QCc:\*U lines.
  1048. X.sp
  1049. Also see the explanation of the variable
  1050. X.B auto_route
  1051. and the MAIL ADDRESSES section for more information concerning
  1052. replying to messages.
  1053. X.TP
  1054. X.BR save / write / copy " [!] [message list] [filename]"
  1055. X.RB ( s / w )
  1056. With no arguments,
  1057. X.B save
  1058. and
  1059. X.B write
  1060. will save the current message to the file
  1061. X.I mbox
  1062. in the user's home directory (or the file specified by the
  1063. X.B mbox
  1064. variable).
  1065. If a message list is given, then the messages specified by
  1066. the list are saved.
  1067. If a filename is given, then that filename is used instead of mbox.
  1068. If the file exists and is writable, the specified command
  1069. will append each message to the end of the file.
  1070. If the `!' is given, then the file is overwritten causing whatever contents it
  1071. contains to be lost.
  1072. The
  1073. X.B write
  1074. command differs from
  1075. X.B save
  1076. and
  1077. X.B copy
  1078. in that the message headers are
  1079. X.I not
  1080. saved in the file along with the body of text.
  1081. X.sp
  1082. If the current folder is the system mailbox, then saved messages are
  1083. marked for deletion when the user exits using the
  1084. X.B quit
  1085. command.
  1086. If the variable
  1087. X.I keepsave
  1088. is set or the current folder is not the system mailbox, then messages are
  1089. not marked for deletion.
  1090. The
  1091. X.B copy
  1092. command is is like
  1093. X.B save
  1094. except that messages are never marked for deletion, whether or not
  1095. X.B keepsave
  1096. is set.
  1097. X.sp
  1098. Because message lists are used to determine the messages to be saved,
  1099. if the user wishes to save messages to a file that begins with a digit
  1100. or any other message list metacharacter, a backslash should precede
  1101. the filename to escape the message list expansion routine.
  1102. The backslash will not become a part of the filename.
  1103. X.TP
  1104. X.BR saveopts " [file]"
  1105. The complement of
  1106. X.BR source ,
  1107. X.B saveopts
  1108. will save all settable variables, aliases
  1109. and cmd's in the initialization file.
  1110. X(See the
  1111. X.B source
  1112. command for more information on initialization files.)
  1113. If an argument is given, that file is used.
  1114. Beware that this will overwrite files, so any \*Qif\*U expressions
  1115. will be lost, as will settings that have changed since entering
  1116. X.IR Mush .
  1117. Using saveopts is highly discouraged
  1118. and is intended for the naive user only.
  1119. X.TP
  1120. X.BR set / unset
  1121. With no arguments, prints all variable values.
  1122. Otherwise, sets option.
  1123. Arguments are of the form \*Qoption=value\*U (whitespace is allowed).
  1124. Boolean expressions need not have \*Q=value\*U associated in the command.
  1125. X.sp
  1126. The special command
  1127. X.sp
  1128. X.ti +2
  1129. set ?all
  1130. X.sp
  1131. will print all known variables utilized by the program and a brief
  1132. description of what they do.
  1133. The user may set and manipulate his own set of variables, but internal
  1134. variables that are utilized by the program are the only ones displayed.
  1135. X.sp
  1136. The command
  1137. X.sp
  1138. X.ti +2
  1139. set ?variable_name
  1140. X.sp
  1141. will print the same information for one variable instead of all variables.
  1142. You may unset everything by issuing the command \*Qunset *\*U.
  1143. X.TP
  1144. X.BR sh " [command]"
  1145. Invokes an interactive version of the shell.
  1146. The shell spawned is described by the variable
  1147. X.BR shell .
  1148. If the optional argument
  1149. X.B command
  1150. is given, then that command is executed under the Bourne Shell.
  1151. If the special character `&' is at the end of any shell command,
  1152. then the command will be executed in background.
  1153. X.TP
  1154. X.BR source " [file]"
  1155. Read
  1156. X.I Mush
  1157. commands from a file.
  1158. If no filename is specified, the files searched
  1159. for are .mushrc or .mailrc in the user's home directory.
  1160. If the environment variable MAILRC is set, then that file is sourced.
  1161. If a filename is given on the command line, that file is sourced.
  1162. See the
  1163. X.B INITIALIZATION
  1164. heading and the
  1165. X.B home
  1166. variable descriptions for more information.
  1167. X.TP
  1168. X.B sort " [-] [d | a | s | S | R]"
  1169. This command
  1170. will sort messages according to author, date, status or subject
  1171. X(with or without considering the "Re: ", in replied messages).
  1172. In addition, the messages can be sorted in reverse order (same arguments).
  1173. X.sp
  1174. X.nf
  1175. Options:
  1176. X.in +2
  1177. X.ta 1i
  1178. X-    reverse sort order
  1179. d    sort by date received
  1180. a    sort by author (alphabetical)
  1181. s    sort by subject ignoring \*QRe:\*U
  1182. R    sort by subject (alphabetical)
  1183. S    sort by message status
  1184. X.in -2
  1185. X.fi
  1186. X.sp
  1187. Note that only one argument (except for the `-'), may be used.
  1188. By default (no arguments),
  1189. X.B sort
  1190. sorts messages by
  1191. X.IR status .
  1192. New, unread messages are first, followed by preserved messages,
  1193. and finally deleted messages are placed at the end of the list.
  1194. X.sp
  1195. If the variable
  1196. X.I sort
  1197. is set, messages are sorted each time the user's system mailbox is
  1198. read as the current folder.
  1199. The
  1200. X.I sort
  1201. variable can be set either to nothing or to legal "sort" arguments.
  1202. X.sp
  1203. Subsorting can be achieved by using the piping mechanism intrinsic to
  1204. the line mode interface;
  1205. no other interface allows subsorting \*Qdirectly\*U.
  1206. Each interface may allow subsorting if appropriate actions are taken,
  1207. as discussed below.
  1208. X.sp
  1209. To subsort messages, the folder must be in a particular order to begin
  1210. with.
  1211. To sort mail by author and then by subject heading, you would
  1212. have to first sort by author:
  1213. X.sp
  1214. X.ti +2
  1215. sort a
  1216. X.sp
  1217. Now that the messages are in order according to author, sorting a
  1218. sublist of messages is done using pipes:
  1219. END_OF_FILE
  1220. if test 38123 -ne `wc -c <'mush.1.b'`; then
  1221.     echo shar: \"'mush.1.b'\" unpacked with wrong size!
  1222. fi
  1223. # end of 'mush.1.b'
  1224. fi
  1225. echo shar: End of archive 12 \(of 14\).
  1226. cp /dev/null ark12isdone
  1227. MISSING=""
  1228. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1229.     if test ! -f ark${I}isdone ; then
  1230.     MISSING="${MISSING} ${I}"
  1231.     fi
  1232. done
  1233. if test "${MISSING}" = "" ; then
  1234.     echo You have unpacked all 14 archives.
  1235.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1236. else
  1237.     echo You still need to unpack the following archives:
  1238.     echo "        " ${MISSING}
  1239. fi
  1240. ##  End of shell archive.
  1241. exit 0
  1242.